<template>
  <div>
      <p>购物车-组件</p>
      <p>名称：{{name}}</p>
      <p>价格：{{price}}</p>
      <p>数量：{{num}}</p>
      <button @click="num ++">+1</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: 'iphone',
      price: 4999,
      num: 1
    }
  }
}
</script>

<style>

</style>